#ifndef __GAME_SERVER_H__
#define __GAME_SERVER_H__

class PacketDecoder;

typedef void (*GameMethod)(UInt32 nSocketId, PacketDecoder* request);



class GateServer: public TimerHandler,public singleton<GateServer>
{
public:
	GateServer(void);
	~GateServer(void);
public:
	void SetSocketServer(ISocketServer* pSocketServer){m_pSocketServer = pSocketServer;};
	ISocketServer* GetSocketServer(){return m_pSocketServer;}
	std::string GetServerPath();

	//void SendDataToDataServer(const void* pData,size_t nDataLen);
	void OnExit();
	void OnTimer(UInt32 nTimerId);
	Int32 Run();
private:
	ISocketServer* m_pSocketServer;
};

//void RegisterMethod(Int32 id, GameMethod method);
#endif
